package com.test.pojo;

import org.beetl.sql.core.annotatoin.Table;

import java.text.SimpleDateFormat;
import java.util.Date;


@Table(name="user")   //对应实体表user
public class Demo {

    private Integer id ;
    private Integer age ;
    private String name ;
    private Date createDate ;






    public String getCreateDateStr() {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:ss:mm");
        if (getCreateDate()!=null){
            return simpleDateFormat.format(getCreateDate());
        }else{
            return "";
        }

    }



    public Demo(Integer id, Integer age, String name, Date createDate) {
        this.id = id;
        this.age = age;
        this.name = name;
        this.createDate = createDate;
    }

    public Demo() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    @Override
    public String toString() {
        return "Demo{" +
                "id=" + id +
                ", age=" + age +
                ", name='" + name + '\'' +
                ", createDate=" + createDate +
                '}';
    }
}
